
/**
 * Created by qwr on 2017/6/5.
 */
import axios from 'axios'
import router from '../router/index'
import {getCookie} from './common'
//axios请求配置
const token=getCookie('token');
var ajax = axios.create({
  timeout: 60000,
  headers: {'Content-Type': 'application/json','Authorization': 1},
  validateStatus: function (status) {
    if(status==401){
      router.push({ path: '/login' })
    }
  },
});
export default ajax;

